import os
import sys
import numpy as np

loss = 1e-3
minimum = 10e-10

def verify_result(golden, real):
    golden = np.fromfile(golden, dtype=np.float16)
    real = np.fromfile(real, dtype=np.float16)
    for i in range(457080):
        if golden[i] - real[i] > 0.001:
            print(golden[i])
            print(real[i])
            print(i)
            break
        if real[i] - golden[i] > 0.001:
            print(golden[i])
            print(real[i])
            print(i)
            break
    return True

if __name__ == '__main__':
    verify_result("../output/golden_xa.bin", "../output/output_xa.bin")